package com.test5.liang.service;

import com.test5.liang.dao.UserMapper;
import com.test5.liang.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserService {

    @Autowired
    UserMapper userMapper;


    public User findUserByName(String userName){
        return userMapper.findUserByName(userName);
    }

    public int insertUser(User user){
        return userMapper.insertUser(user);
    }

    public int updateUser(User user){
        return userMapper.updateUser(user);
    }

    public List<User> selectAllUser(){
        return userMapper.selectAllUser();
    }



}
